﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace chesslibrary.cs
{
    public sealed class color_pieces
    {
        private static color_pieces white=new color_pieces();
		private static color_pieces black=new color_pieces();
        private color_pieces(){}
		public static color_pieces White
		{
			get{return white;}
		}
		public static color_pieces Black
		{
			get{return black;}
		}
        public bool IsWhite()
		{
			return this==color_pieces.White;
		}
		public bool IsBlack()
		{
			return this==color_pieces.Black;
		}
        public bool IsIsEnemyOf(color_pieces side)
		{
			return this==side;
		}
        public color_pieces Enemy
        {
            get
            {
                if (this == White)
                {
                    return Black;
                }
                return White;
            }
        }
        public override string ToString()
        {
            if (this == White)
            {
                return "W";
            }
            return "B";
        }	
    }
}
